from selenium.webdriver.common.by import By
import time
from common.base import Base
from common.functions import open_browser


class Login_Page(Base):
    def username(self,username):
        time.sleep(2)
        self.send_keys((By.NAME,'username'),username)

    def password(self,password):
        time.sleep(2)
        self.send_keys((By.NAME,'password'),password)


    def loginbth(self):
        time.sleep(2)
        self.click((By.CLASS_NAME,'us_Submit'))



if __name__ == '__main__':
    driver =open_browser()
    lo = Login_Page(driver)
    lo.get('http://139.129.26.163/user.php')
    lo.username('user1')
    time.sleep(2)
    lo.password('123456')
    lo.loginbth()
    lo.quit()


